package com.waijiaojun.tpo.repository;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import com.waijiaojun.tpo.entity.Category;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface CategoryDao {
    int insert(@Param("pojo") Category pojo);

    int insertSelective(@Param("pojo") Category pojo);

    int insertList(@Param("pojos") List<Category> pojo);

    int update(@Param("pojo") Category pojo);

    Category findByCategoryId(@Param("categoryId")Long categoryId);

    List<Category> findAll(@Param("search")String search,@Param("order")String order,@Param("sort")String sort, RowBounds rowBounds);

    Long findAllCount(@Param("search")String search);

    void delete(@Param("id")Long id);

    List<Category> getAll();

    Category findById(Long id);
}
